<script setup lang="ts">

import {useAppStore} from "@/store";
import SidebarItem from "@/components/SidebarItem.vue";
import {usePermissionStore} from "@/store";

const appStore = useAppStore();
const permissionStore = usePermissionStore();

</script>

<template>
  <t-aside :width="appStore.menuCollapsed ? '64px' : '232px'">
    <t-menu :collapsed="appStore.menuCollapse" :defaultValue="$route.name"> <!--点亮菜单，对应的route名字蓝色标识：:defaultValue="$route.name"-->
      <sidebar-item
          v-for="item in permissionStore.menuRoutes"
          :key="item.name"
          :item="item"
      ></sidebar-item>
    </t-menu>
  </t-aside>
</template>

<style scoped>

</style>